package handlers

import (
	"net/http"
	"strings"
)

//checkHttpMethod 检测httpmethod是否允许，若不允许则返回错误
func checkHttpMethod(method string,r *http.Request,w http.ResponseWriter)bool{
	if r.Method==strings.ToUpper(method){
		return true
	}
	w.WriteHeader(http.StatusMethodNotAllowed)
	SendServerErrResp(w)
	return false
}
